﻿using System.Collections.Generic;
using System.Xml.Serialization;

namespace MusicPlayer
{
    /// <summary>
    /// 播放器上下文
    /// </summary>
    [XmlRoot("conetxt")]
    public class PlayerContext
    {
        public PlayerContext() 
        {
            FileList = new List<string>();
        }

        //
        // 文件列表
        //
        [XmlArray("file-list")]
        public List<string> FileList { get; set; }

        //
        // 播放顺序
        //
        [XmlElement("play-order")]
        public int PlayOrder {  get; set; }

        //
        // 当前播放
        //
        [XmlElement("current-index")]
        public int CurrentIndex {  get; set; }

        //
        // 播放进度
        //
        [XmlElement("current-time")]
        public double CurrentTime { get; set; }

        /// <summary>
        /// 音量
        /// </summary>
        [XmlElement("volume")]
        public int Volume {  get; set; }
    }
}
